import qs from 'qs'; //query string.

export const getUrlParams = url => {
  const result = {};
  if (url) {
    const splits = decodeURI(url).split('?');
    if (splits.length > 1 && splits[1]) {
      return qs.parse(splits[1]);
    }
  }
  return result;
};

export default {
  getUrlParams,
};
